package com.bj58.mis.apm.server.kylin.common.util;

import java.util.Collection;
import java.util.Iterator;

public class SumHelper {
    public SumHelper() {
    }

    public static Long sumLong(Collection<Long> input) {
        Long sum = 0L;

        Long x;
        for(Iterator i$ = input.iterator(); i$.hasNext(); sum = sum + x) {
            x = (Long)i$.next();
        }

        return sum;
    }

    public static Long sumInteger(Collection<Integer> input) {
        Long sum = 0L;

        Integer x;
        for(Iterator i$ = input.iterator(); i$.hasNext(); sum = sum + (long)x) {
            x = (Integer)i$.next();
        }

        return sum;
    }

    public static Double sumDouble(Collection<Double> input) {
        Double sum = 0.0D;

        Double x;
        for(Iterator i$ = input.iterator(); i$.hasNext(); sum = sum + x) {
            x = (Double)i$.next();
        }

        return sum;
    }
}

